package String.Builder;

import java.util.Scanner;

public class 字符串反转2 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String line= sc.nextLine();
        String s = arreyToString(line);
        System.out.println("s:"+s);

    }
    public static String arreyToString(String s) {
//        StringBuilder sb=new StringBuilder(s);
//        sb.reverse();
//        String ss = sb.toString();
//        return ss;
        return new StringBuilder(s).reverse().toString();

    }
}       
        
    

